package jiekou.demo01;

public class Test {
    public static void main(String[] args) {

        Frog f = new Frog("小青",18);
        f.eat();
        f.swim();
        System.out.println(f.getAge()+" "+f.getName());
        System.out.println("------------------");
        Dog d = new Dog("小黑",5);
        d.eat();
        d.swim();
        System.out.println(d.getAge()+" "+d.getName());
        System.out.println("------------------");
        Rabbit r = new Rabbit("小白",6);
        r.eat();
        System.out.println(r.getAge()+" "+r.getName());
    }
}
